package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.MgtViolationMapper;
import com.ruoyi.bussiness.domain.MgtViolation;
import com.ruoyi.bussiness.service.IMgtViolationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 违章Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class MgtViolationServiceImpl implements IMgtViolationService 
{
    @Autowired
    private MgtViolationMapper mgtViolationMapper;

    /**
     * 查询违章
     * 
     * @param id 违章主键
     * @return 违章
     */
    @Override
    public MgtViolation selectMgtViolationById(Long id)
    {
        return mgtViolationMapper.selectMgtViolationById(id);
    }

    /**
     * 查询违章列表
     * 
     * @param mgtViolation 违章
     * @return 违章
     */
    @Override
    public List<MgtViolation> selectMgtViolationList(MgtViolation mgtViolation)
    {
        return mgtViolationMapper.selectMgtViolationList(mgtViolation);
    }

    /**
     * 新增违章
     * 
     * @param mgtViolation 违章
     * @return 结果
     */
    @Override
    public int insertMgtViolation(MgtViolation mgtViolation)
    {
        return mgtViolationMapper.insertMgtViolation(mgtViolation);
    }

    /**
     * 修改违章
     * 
     * @param mgtViolation 违章
     * @return 结果
     */
    @Override
    public int updateMgtViolation(MgtViolation mgtViolation)
    {
        return mgtViolationMapper.updateMgtViolation(mgtViolation);
    }

    /**
     * 批量删除违章
     * 
     * @param ids 需要删除的违章主键
     * @return 结果
     */
    @Override
    public int deleteMgtViolationByIds(String ids)
    {
        return mgtViolationMapper.deleteMgtViolationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除违章信息
     * 
     * @param id 违章主键
     * @return 结果
     */
    @Override
    public int deleteMgtViolationById(Long id)
    {
        return mgtViolationMapper.deleteMgtViolationById(id);
    }
}
